package Tracker.server.model;

import org.json.JSONException;
import org.json.JSONObject;

public class Session extends JSONObject {
	public final int id;
	public final User user;
	JSONObject vars;
	
	public Session(int id, User user) throws JSONException {
		this.put("id", id);
		this.id = id;
		
		this.user = user;
		this.put("user", user);
		this.put("vars", vars);
	}
	
	public Object param(String key) throws JSONException {
		return vars.get(key);
	}
	
	public void param(String key, String value) throws JSONException {
		this.vars.put(key, value);
	}
}
